.\"   $Id: GENLIB_WIRE2.3,v 1.1 2002/03/08 14:08:11 fred Exp $
.\" @(#)GENLIB_WIRE2.3 2.11 91/08/22 ; Labo Cao-vlsi; Author : Frederic Petrot
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
GENLIB_WIRE2
.XE \}
.TH GENLIB_WIRE2.3 "October 1, 1997" "ASIM/LIP6" "PROCEDURAL GENERATION LANGUAGE"
.SH NAME
GENLIB_WIRE2 \- place two physical segments in the current figure
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include <genlib.h>
void GENLIB_WIRE2(layer, width, ins1, con1, index1, ins2, con2, index2, x, y)
char layer;
long width;
char \(**ins1, \(**con1, \(**ins2, \(**con2;
long x, y;
.ft R
.fi
.so man1/alc_origin.1
.SH PARAMETERS
.TP 20
\fIlayer\fP
Layout layer of the segment
.TP
\fIwidth\fP
Width of the segment
.TP
\fIins1\fP
Name of the instance in which the connector \fIcon1\fP is to be looked for
.TP
\fIcon1\fP
Name of a connector, or reference, used as first endpoint of the wire
.TP
\fIins2\fP
Name of the instance in which the connector \fIcon2\fP is to be looked for
.TP
\fIcon2\fP
Name of a connector, or reference, used as last endpoint of the wire
.TP
\fIx, y\fP
Coordinates of the segment's elbow in the current figure
.SH DESCRIPTION
\fBWIRE2\fP adds two segments made of the \fIlayer\fP level in the current
layout cell, the starting point
being the connector, or reference, \fIcon1\fP of the instance \fIins1\fP, and
the ending point being the connector, or reference, \fIcon2\fP of the instance
\fIins1\fP. The first segment is drawn between the coordinates of \fIcon1\fP in
the current figure and \fIx, y\fP, and the second one between \fIx, y\fP and the
coordinates of \fIcon2\fP in the current figure. 
.LP
If the endpoints are connectors, the indexes \fIindex1\fP and \fIindex2\fP must
respectivly refer to \fIcon1\fP and \fIcon2\fP.
If they are references, then they are not taked care of.
One shall notice that connectors and references of a given model should not
share names if \fBWIRE2\fP is to be used.
.LP
The \fIlayer\fP argument can take the following legal values :
.RS
.TP
\fBNWELL\fP 
.TP
\fBPWELL\fP 
.TP
\fBNTIE\fP 
.TP
\fBPTIE\fP 
.TP
\fBNDIF\fP 
.TP
\fBPDIF\fP 
.TP
\fBNTRANS\fP 
.TP
\fBPTRANS\fP 
.TP
\fBPOLY\fP 
.TP
\fBALU1\fP 
.TP
\fBALU2\fP 
.TP
\fBALU3\fP 
.TP
\fBTPOLY\fP 
.TP
\fBTALU1\fP 
.TP
\fBTALU2\fP 
.TP
\fBTALU3\fP 
.RE
.SH ERRORS
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"GENLIB_WIRE2 impossible : missing GENLIB_DEF_PHFIG"
.ft R
.RS
No figure has been yet specified by a call to \fBDEF_PHFIG\fP. So it isn't
possible to place an instance inside it.
you must call \fBDEF_PHFIG\fP before any other layout action.
.RE
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"illegal addphseg : x1, y1, x2, y2"
.ft R
.RS
A symbolic segment must be either vertical or horizontal, so either
\fIx1 = x2\fP, or \fIy1 = y2\fP. Since \fBWIRE2\fP creates segments from
relative coordinates, care must be taken to follow the previous rule.
.RE
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"GENLIB_WIRE2 impossible : same name \fIconX\fP, for connector and reference in
\fIinsX\fP"
.ft R
.RS
The model of the instance \fIinsX\fP has both a connector and a reference
that matches the \fIconX\fP name. This is not legal since genlib doesn't know
which one to choose as point.
.RE
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"illegal getphins : instance \fIinsX\fP does not exist"
.ft R
.RS
The instance called \fIinsX\fP does not currently belong to the figure.
.RE
.SH EXAMPLE
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include <genlib.h>
main()
{
	/\(** Create a figure to work on  \(**/
	GENLIB_DEF_PHFIG("cell");
	GENLIB_PLACE("gaci0_b", "r_addin_1", NOSYM, 0, 0);
	GENLIB_PLACE_TOP("gacin_b", "r_addin_2", NOSYM);
	GENLIB_PLACE_RIGHT("gapgn_b", "pg", NOSYM);
	/\(** Draw a segment \(**/
	GENLIB_WIRE2(ALU1, 1, "r_addin_1", "out", 0L, "pg", "g", 1L,
			GENLIB_GET_CON_X("pg", "g", 1L),
			GENLIB_GET_CON_Y("r_addin_1", "out", 0L));
	/\(** Save that on disk \(**/
	GENLIB_SAVE_PHFIG();
}
.ft R
.fi
.SH SEE ALSO
.BR genlib (1),
.BR GENLIB_DEF_PHFIG (3),
.BR GENLIB_SAVE_PHFIG (3),
.BR GENLIB_COPY_UP_SEG (3),
.BR GENLIB_PHSEG (3),
.BR GENLIB_THRU_H (3),
.BR GENLIB_THRU_CON_H (3),
.BR GENLIB_THRU_V (3),
.BR GENLIB_THRU_CON_V (3),
.BR GENLIB_WIRE1 (3),
.BR GENLIB_WIRE3 (3).


.so man1/alc_bug_report.1

